Integrand size = 19, antiderivative size = 37 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=\frac {a \text {arctanh}(\sin (c+d x))}{d}-\frac {a \cot (c+d x)}{d}-\frac {a \csc (c+d x)}{d} \]
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.16 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.11 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=-\frac {a \cot (c+d x)}{d}-\frac {a \csc (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\sin ^2(c+d x)\right )}{d} \]
Time = 0.42 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.95, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.789, Rules used = {3042, 4360, 25, 25, 3042, 25, 3317, 25, 3042, 3101, 25, 262, 219, 4254, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(c+d x) (a \sec (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a-a \csc \left (c+d x-\frac {\pi }{2}\right )}{\cos \left (c+d x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int -\left (\csc ^2(c+d x) \sec (c+d x) (a (-\cos (c+d x))-a)\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int -\left ((\cos (c+d x) a+a) \csc ^2(c+d x) \sec (c+d x)\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \csc ^2(c+d x) \sec (c+d x) (a \cos (c+d x)+a)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {a-a \sin \left (c+d x-\frac {\pi }{2}\right )}{\sin \left (c+d x-\frac {\pi }{2}\right ) \cos \left (c+d x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {a-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )}{\cos \left (\frac {1}{2} (2 c-\pi )+d x\right )^2 \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \csc ^2(c+d x)dx-a \int -\csc ^2(c+d x) \sec (c+d x)dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle a \int \csc ^2(c+d x)dx+a \int \csc ^2(c+d x) \sec (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc (c+d x)^2dx+a \int \csc (c+d x)^2 \sec (c+d x)dx\) |
\(\Big \downarrow \) 3101 |
\(\displaystyle a \int \csc (c+d x)^2dx-\frac {a \int -\frac {\csc ^2(c+d x)}{1-\csc ^2(c+d x)}d\csc (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \frac {\csc ^2(c+d x)}{1-\csc ^2(c+d x)}d\csc (c+d x)}{d}+a \int \csc (c+d x)^2dx\) |
\(\Big \downarrow \) 262 |
\(\displaystyle a \int \csc (c+d x)^2dx-\frac {a \left (\csc (c+d x)-\int \frac {1}{1-\csc ^2(c+d x)}d\csc (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle a \int \csc (c+d x)^2dx-\frac {a (\csc (c+d x)-\text {arctanh}(\csc (c+d x)))}{d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {a \int 1d\cot (c+d x)}{d}-\frac {a (\csc (c+d x)-\text {arctanh}(\csc (c+d x)))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {a (\csc (c+d x)-\text {arctanh}(\csc (c+d x)))}{d}-\frac {a \cot (c+d x)}{d}\) |
3.1.14.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_S ymbol] :> Simp[-(f*a^n)^(-1) Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 0.75 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-a \cot \left (d x +c \right )}{d}\) | \(42\) |
default | \(\frac {a \left (-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-a \cot \left (d x +c \right )}{d}\) | \(42\) |
norman | \(-\frac {a}{d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(54\) |
risch | \(-\frac {2 i a}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(59\) |
parallelrisch | \(\frac {a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-1\right )}{d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}\) | \(64\) |
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.70 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=\frac {a \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - a \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 2 \, a}{2 \, d \sin \left (d x + c\right )} \]
1/2*(a*log(sin(d*x + c) + 1)*sin(d*x + c) - a*log(-sin(d*x + c) + 1)*sin(d *x + c) - 2*a*cos(d*x + c) - 2*a)/(d*sin(d*x + c))
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=a \left (\int \csc ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc ^{2}{\left (c + d x \right )}\, dx\right ) \]
Time = 0.20 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.35 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=-\frac {a {\left (\frac {2}{\sin \left (d x + c\right )} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + \frac {2 \, a}{\tan \left (d x + c\right )}}{2 \, d} \]
-1/2*(a*(2/sin(d*x + c) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 2*a/tan(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.35 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{d} \]
(a*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - a*log(abs(tan(1/2*d*x + 1/2*c) - 1 )) - a/tan(1/2*d*x + 1/2*c))/d
Time = 13.69 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.78 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x)) \, dx=\frac {a\,\left (2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]